/**
 * Suspendable.java
 * created on 2012/06/04
 */
package dh.abs;

import java.io.File;


/**
 * The class which implements this interface must be suspendable.
 * This is different from Serializable interface.
 * @author denialhumanity
 *
 */
public interface Suspendable {
    /**
     * This method stores the class state to file.
     * Stored file must be read by loadFromFile method.
     * @param file File instance. Existing file is overwritten.
     * @throws SuspendException
     */
    public void storeToFile(File file) throws SuspendException;
    
    /**
     * This method loads the class state from specified file created by storeToFile method.
     * @param file File instance. 
     * @throws SuspendException
     */
    public void loadFromFile(File file) throws SuspendException;
    
    /**
     * This method returns the unique ID of the class instance.
     * @return
     */
    public String getID();
}
